
#include "PthreadPoolS.h"



void createPGworker(PthreadPoolS * pps , int size){
    for(int i = 0 ; i < pps->thd_arry.size ; ++i){
       pthread_create(&pps->thd_arry.pid[i],NULL,singleThreadFunc,pps); 
    }
    return ;
}


void PthreadPoolSInit(PthreadPoolS * pps ,int size ){
    pthreadArryInit(&pps->thd_arry,size);
    readyQueueInit(&pps->rdq);
    pthread_mutex_init(&pps->lock1,NULL);
    pthread_cond_init(&pps->cond,NULL);
    createPGworker(pps,size);
}
